home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.hut.fi!usenet
- From: Janne.Jalkanen@hut.fi (Janne Jalkanen)
- Newsgroups: comp.sys.amiga.misc
- Subject: Re: OS features
- Date: 16 Jan 1996 12:49:12 +0200
- Organization: Helsinki University of Technology, Finland
- Sender: jalkanen@freud.hut.fi
- Distribution: inet
- Message-ID: <m4d20p0mn2v.fsf@freud.hut.fi>
- References: <92747544038@PAPA.NORTH.DE> <4b3h9s$1st@alterdial.UU.NET>
- <hmAVx*Y3f@yaps.rhein.de> <cg.75pf@ami-cg.GraySage.Edmonton.AB.CA>
- <4d3t9e$mkv@hermes.louisville.edu>
- Reply-To: Janne.Jalkanen@hut.fi
- NNTP-Posting-Host: freud.hut.fi
- In-reply-to: krsear01@homer.louisville.edu's message of 11 Jan 1996 20:51:58
- GMT
- X-Newsreader: Gnus v5.0.12
-
- In article <4d3t9e$mkv@hermes.louisville.edu> krsear01@homer.louisville.edu (Kendall R. Sears) writes:
-
- >What I propose is a system to segregate the system memory into 3 parts:
- > 1) an area for the OS that is protected from writes by user processes
- > 2) an area for user code that is write protected
- > and
- > 3) a "public" area where the data segments of programs are stored as well
- > as message ports, and other data that need to be accessed by multiple
- > programs.
-
- Something like MEMF_PUBLIC, MEMF_PROTECTED and MEMF_PRIVATE? I have
- been toying around with a similar idea. Code space would be allocated
- from protected memory space, so that crazed programs could not write
- over existing code (and self-modifying code works badly
- anyway). Private data would be specifically protected with the
- MEMF_PRIVATE flag and the application programmer would know upon
- writing the code that the data in it cannot be shared with other
- tasks. Old programs would be given MEMF_PUBLIC-type memory always so
- that they would continue to work, and crash each other. If the OS
- contained more checks against rogue pointers we could have a very
- stable OS with a very high degree compatability.
-
- >Obviously, if a rogue program goes tromping through area 3 data could be
- >corrupted, but correctly written programs check packet validity upon receipt
- >to their port(s) and should be able to reject bad data, in the case where they
-
- This means the OS also should be more picky about the data it gets.
-
- >Obviously, use of the MMU to change the status of memory sections will create
- >some slowdown, but since most, if not all, changes will occur with a context
- >switch this probably won't be noticed.
-
- I bet every serious Amiga programmer would be ready to live with it. I
- know I would =)
-
- >We could even take this a little farther... Assume that an Area 3 is set up
- >for each process, when a process disappears (for any reason) the OS could
- >call a DeletePool() on the area to recover most allocated memory (assuming,
- >of course, that AllocMem() et al. is changed to call the pool functions.)
- >The OS could either use an age mechanism or a task that occasionally runs
- >the pools looking for headers that contain ids that no longer exist.
-
- Resource tracking? Would be fun... I'd also like to see an ability to
- reduce memory trashing, but this should come "almost free" with a VM
- solution.
-
- >This scheme wouldn't keep everything from crashing, nor would it be 100%
- >compatible, but I believe that it'd work and make the system much more
- >stable without significant speed penalties.
-
- I also believe it might work. It might also provide an upgrade path
- to full memory protection later on.
-
- >Kendall.
- --
- Janne Jalkanen ///! For those who have to fight for it
- Janne.Jalkanen@hut.fi /// ! life has a flavor
- <*> \\\/// ! the protected will never understand
- -'Keep on going...' \XX/ ! (anonymous, Viet Nam, 1968)
-